﻿using GWB.Core.Enum;
using GWB.Core.TableEntity.Common;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GWB.Core.TableEntity
{

    /// <summary>
    /// 用户
    /// </summary>
    [SugarTable("GWB_User")]//当和数据库名称不一样可以设置表别名 指定表明
    public class User: OrgEntity
    {
        /// <summary>
        /// 名字
        /// </summary>
        [SugarColumn(ColumnDataType = "nvarchar(20)", ColumnDescription = "名字", IsNullable = true)]
        public string Name { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar(50)", ColumnDescription = "账号", IsNullable = false)]
        public string Account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar(100)", ColumnDescription = "密码", IsNullable = false)]
        public string Password { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar(20)", ColumnDescription = "电话", IsNullable = false)]
        public string Phone { get; set; }

        [SugarColumn(ColumnDataType = "bit", ColumnDescription = "状态 0:禁用 1:启用", IsNullable = true)]
        public StateType State { get; set; }

        /// <summary>
        /// 角色Id
        /// </summary>
        [SugarColumn(ColumnDataType = "bigint", ColumnDescription = "角色Id", IsNullable = true)]
        public long RoleId { get; set; }

       
    }
}
